package com.xiongmm.stream.support;

/**
 * @author: XiongMM
 * @date: 2019/5/28 10:04
 * @description: Opentsdb不变量
 */
public class OpentsdbConstant {

    //*******************************************************
    //                 基础配置 区
    //*******************************************************

    public static final String PROJECT_NAME = "ozono";

    /**
     * opentsdb集群
     */
    public static final String OPEN_TSDB_CLUSTER = "default";

    //*******************************************************
    //                 tag 区
    //*******************************************************

    /**
     * 公共tag-appId
     */
    public static final String COMMON_TAG_APPID = "appId";

    /**
     * 公共tag - inst_id
     */
    public static final String COMMON_TAG_INSTID = "inst_id";

    /**
     * 公共tag - command_type
     */
    public static final String COMMON_TAG_CMD_TYPE = "command_type";

    /**
     * 公共tag-ip_port
     */
    public static final String COMMON_TAG_INSTANCE = "ip_port";

    /**
     * 公共tag-indicator (key_count/hasExpireKeyCount/expireKeyCount .... )
     */
    public static final String COMMON_TAG_INDICARTOR = "indicator";

    /**
     * 公共tag-角色
     */
    public static final String COMMON_TAG_ROLE = "role";

    //*******************************************************
    //                 info - metric 区
    //*******************************************************

    /**
     * metirc - 集群统计/实例统计
     */
    public static final String METRIC_APP_INSTANCE_MONITOR = "ozono.monitor.app.instance";

    /**
     * metric - 命令监控大盘/基础监控
     */
    public static final String METRIC_COMMAND_BASE_MONITOR = "ozono.monitor.command.base";


    /**
     * metric - 命令监控大盘/key类型监控
     */
    public static final String METRIC_COMMAND_KEY_MONITOR = "ozono.monitor.command.key";

    /**
     * metric - 实例监控大盘
     */
    public static final String METRIC_INSTANCE_MONITOR = "ozono.monitor.command.base";


    //*******************************************************
    //        indicator - 集群统计/实例统计 constant 区
    //*******************************************************

    public static final String INDICATOR_QPS = "qps";

    public static final String INDICATOR_KEY_COUNT = "key_count";

    public static final String INDICATOR_HIT_PERCENT = "hit_percent";

    public static final String INDICATOR_CURR_CONNECTIONS = "curr_connections";

    public static final String INDICATOR_MEM_USED_PERCENT = "mem_used_percent";

    public static final String INDICATOR_MEM_USED = "mem_used";


    //*******************************************************
    //      indicator - 命令监控大盘-基础监控 constant 区
    //*******************************************************

    public static final String INDICATOR_HAS_EXPIRED_KEY_COUNT = "has_expired_key_count";

    public static final String INDICATOR_EXPIRED_KEY_COUNT_DIFF = "expired_key_count_diff";

    public static final String INDICATOR_EVICTED_KEY_COUNT_DIFF = "evicted_key_count_diff";

    public static final String INDICATOR_MISSES_DIFF = "misses_diff";

    public static final String INDICATOR_TOTAL_COMMANDS_PROCESSED_DIFF = "total_commands_processed_diff";


    //*******************************************************
    //      indicator - 实例监控大盘 constant 区
    //*******************************************************

    public static final String INDICATOR_ROLE = "role";

    public static final String INDICATOR_LATEST_FORK_USEC = "latest_fork_usec";

    public static final String INDICATOR_AOF_REWRITE_IN_PROGRESS = "aof_rewrite_in_progress";

    public static final String INDICATOR_AOF_LAST_REWRITE_TIME_SEC = "aof_last_rewrite_time_sec";

    public static final String INDICATOR_AOF_CURRENT_SIZE = "aof_current_size";

    public static final String INDICATOR_AOF_BASE_SIZE = "aof_base_size";

    public static final String INDICATOR_CLIENT_INPUT_BUF = "client_input_buf";

    public static final String INDICATOR_CLIENT_OUTPUT_LIST = "client_output_list";

    public static final String INDICATOR_RDB_LAST_BGSAVE_STATUS = "rdb_last_bgsave_status";


}
